"""
贪婪模式：尽可能多的匹配
懒惰模式：尽可能少的匹配
"""
import re
string='pythondnshdfy'
pattern1='p.*y'#贪婪模式
pattern2='p.*?y'#懒惰模式，精准
result = re.search(pattern1,string)
print(result)
result = re.search(pattern2,string)
print(result)


